import { request,server,serverUpload } from '../utils/request.js'


export  function getCode(data){ 
	return request({
		url:'/api/oauth/getWeChartSmallProgramLoginInfo',
		method: 'GET',
		data
	})
}
export  function login(data){ // 登陆
	return request({
		url:'/api/user/dcH5WechatLogin',
		method: 'POST',
		data
	})
}

// 图片上传
export  function uploadImages(data){ 
	return serverUpload({
		url:'/api/file/uploadImages',
		method: 'POST',
		data
	})
}
export  function queryFollowTrace(data){ 
	return request({
		url:'/api/logistics/queryFollowTrace',
		method: 'POST',
		data
	})
}


// 获取个人信息
export  function searchUserInfoById(data){ 
	return request({
		url:'/api/user/searchUserInfoById',
		method: 'GET',
		data
	})
}

// 修改个人信息 /api/user/updateUserInfo
export  function updateUserInfo(data){ 
	return server({
		url:'/api/user/updateUserInfo',
		method: 'POST',
		data
	})
}
// 获取热销
export  function getHomeDataInfo(data){ 
	return request({
		url:'/api/plugs/getHomeDataInfo',
		method: 'GET',
		data
	})
}
// 获取热销商品 '/api/plugs/searchPlugsGoodsByCategoryId'
export  function searchHotGoodsList(data){ 
	return request({
		url:'/api/plugs/searchHotGoodsList',
		method: 'GET',
		data
	})
}
// 获取店铺 /api/plugs/getBusinessInfo'
export  function getBusinessInfoList(data){ 
	return request({
		url:'/api/plugs/getBusinessInfo',
		method: 'GET',
		data
	})
}
// 获取首页轮播
export  function getRecommen(data){ 
	return request({
		url:'/api/plugs/getApplicationPlugsRecommendedList',
		method: 'GET',
		data
	})
}

// 获取分类
export  function getCategory(data){ 
	return request({
		url:'/api/plugs/getShopGoodCategoryList',
		method: 'GET',
		data
	})
}
// 获取分类下面的商品 '/api/plugs/searchPlugsGoodsByCategoryId'
export  function searchPlugsGoodsByCategoryId(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsByCategoryId',
		method: 'GET',
		data
	})
}
// 商品加入购物车  insertPlugsShopCart
export  function insertPlugsShopCart(data){ 
	return server({
		url:'/api/plugs/insertPlugsShopCart',
		method: 'POST',
		data
	})
}
// 搜索商品 goodSearch
export  function goodSearch(data){ 
	return request({
		url:'/api/plugs/goodSearch',
		method: 'GET',
		data
	})
}
//查看购物车 getPlugsShopCartByUserId
export  function getPlugsShopCartByUserId(data){ 
	return request({
		url:'/api/plugs/getPlugsShopCartByUserId',
		method: 'GET',
		data
	})
}
// 删除购物车 /api/plugs/delPlugsShopCart
export  function delPlugsShopCart(data){ 
	return request({
		url:'/api/plugs/delPlugsShopCart',
		method: 'POST',
		data
	})
}
// 修改购物车 /api/plugs/updatePlugsShopCart
export  function updatePlugsShopCart(data){ 
	return server({
		url:'/api/plugs/updatePlugsShopCart',
		method: 'POST',
		data
	})
}
// 查看商品详情 /api/plugs/searchPlugsGoodsById
export  function searchPlugsGoodsById(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsById',
		method: 'GET',
		data
	})
}
// 获取产品规格 searchPlugsGoodsSpecificationByGoodsId
export  function searchPlugsGoodsSpecificationByGoodsId(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsSpecificationByGoodsId',
		method: 'GET',
		data
	})
}
// 查询配送费  /api/platform/getShippingFeeEstimate
export  function getShippingFeeEstimate(data){ 
	return server({
		url:'/api/platform/getShippingFeeEstimate',
		method: 'POST',
		data
	})
}
// 创建订单 /api/order/createOrder
export  function createOrder(data){ 
	return server({
		url:'/api/order/createOrder',
		method: 'POST',
		data
	})
}
//订单支付 /api/pay/appletsWechatOrderPay
export  function partnerAppletsWechatOrderPay(data){ 
	return server({
		url:'/api/pay/partnerAppletsWechatOrderPay',
		method: 'POST',
		data
	})
}
export  function appletsWechatOrderPay(data){ 
	return server({
		url:'/api/pay/appletsWechatOrderPay',
		method: 'POST',
		data
	})
}

// 获取订单 /api/order/searchUserOrderListByStatus
export  function searchUserOrderListByStatus(data){ 
	return request({
		url:'/api/order/searchUserOrderListByStatus',
		method: 'GET',
		data
	})
}

// 通过订单ID获取订单 /api/order/getOrderInfoById
export  function getOrderInfoById(data){ 
	return request({
		url:'/api/order/getOrderInfoById',
		method: 'GET',
		data
	})
}
// 取消订单 cancelOrder
export  function cancelOrder(data){ 
	return request({
		url:'/api/order/cancelOrder',
		method: 'GET',
		data
	})
}
// 删除订单 delOrder
export  function delOrder(data){ 
	return request({
		url:'/api/order/delOrder',
		method: 'POST',
		data
	})
}
// 申请退款 userApplyOrderRefund
export  function userApplyOrderRefund(data){ 
	return request({
		url:'/api/order/userApplyOrderRefund',
		method: 'POST',
		data
	})
}
// 加入收藏 api/plugs/insertPlugsCollect
export  function insertPlugsCollect(data){ 
	return server({
		url:'/api/plugs/insertPlugsCollect',
		method: 'POST',
		data
	})
}

// 收藏列表 api/plugs/searchPlugsCollectByUserId  
export  function searchPlugsCollectByUserId(data){ 
	return request({
		url:'/api/plugs/searchPlugsCollectByUserId',
		method: 'GET',
		data
	})
}

// 删除收藏 delPlugsCollect
export  function delPlugsCollect(data){ 
	return request({
		url:'/api/plugs/delPlugsCollect',
		method: 'POST',
		data
	})
}
// 获取优惠券 /api/plugs/passwordCouponsExchange
export  function passwordCouponsExchange(data){ 
	return request({
		url:'/api/plugs/passwordCouponsExchange',
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsCouponsByUserId
export  function searchPlugsCouponsByUserId(data){ 
	return request({
		url:'/api/plugs/searchPlugsCouponsByUserId', 
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsCouponsByBusinessId 领券中心
export  function searchPlugsCouponsByBusinessId(data){ 
	return request({
		url:'/api/plugs/searchPlugsCouponsByBusinessId',
		method: 'GET',
		data
	})
}
// 领取优惠券 /api/plugs/receiveCoupons
export  function receiveCoupons(data){ 
	return request({
		url:'/api/plugs/receiveCoupons',
		method: 'POST',
		data
	})
}
// getPlugsConfigInfo
export  function getPlugsConfigInfo(data){ 
	return request({
		url:'/api/plugs/getPlugsConfigInfo',
		method: 'GET',
		data
	})
}
// /api/pay/getUserPayReacord
export  function getUserPayReacord(data){ 
	return request({
		url:'/api/pay/getUserPayReacord',
		method: 'GET',
		data
	})
}
// /api/user/getUserConsumptionRecordList
export  function getUserConsumptionRecordList(data){ 
	return request({
		url:'/api/user/getUserConsumptionRecordList',
		method: 'GET',
		data
	})
}
// getIntegralGoodsList 积分
export  function getIntegralGoodsList(data){ 
	return request({
		url:'/api/plugs/getIntegralGoodsList',
		method: 'GET',
		data
	})
}
// getUserIntegralRecordList 积分记录
export  function getUserIntegralRecordList(data){ 
	return request({
		url:'/api/plugs/getUserIntegralRecordList',
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsFormList 获取表单列表
export  function searchPlugsFormList(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormList',
		method: 'GET',
		data
	})
}

// /api/plugs/insertPlugsFormData
export  function insertPlugsFormData(data){ 
	return server({
		url:'/api/plugs/insertPlugsFormData',
		method: 'POST',
		data
	})
}

// 提交记录
export  function getUserSubmitFormDataList(data){ 
	return request({
		url:'/api/plugs/getUserSubmitFormDataList',
		method: 'GET',
		data
	})
}
// searchPlugsPracticeQuestionBankList 获取科目下面的题库
export  function searchPlugsPracticeQuestionBankList(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeQuestionBankList',
		method: 'GET',
		data
	})
}
// searchPlugsPracticeTestQuestionsManageList 获取题库下的试题
export  function getPracticeTestQuestionsByquestionBankList(data){ 
	return request({
		url:'/api/plugs/getPracticeTestQuestionsByquestionBankList',
		method: 'GET',
		data
	})
}

// /api/plugs/getPlugsPracticeStudentByCard

export  function getPlugsPracticeStudentByCard(data){ 
	return request({
		url:'/api/plugs/getPlugsPracticeStudentByCard',
		method: 'GET',
		data
	})
}

// /api/plugs/updatePlugsPracticeStudent 

export  function updatePlugsPracticeStudent(data){ 
	return server({
		url:'/api/plugs/updatePlugsPracticeStudent',
		method: 'POST',
		data
	})
}

// /api/oauth/userIsLogin 判断token是否过期

export  function userIsLogin(data){ 
	return request({
		url:'/api/oauth/userIsLogin',
		method: 'GET',
		data
	})
}

// checkPracticeStudentBindingState 验证是否绑定
export  function checkPracticeStudentBindingState(data){ 
	return request({
		url:'/api/plugs/checkPracticeStudentBindingState',
		method: 'GET',
		data
	})
}

// searchPlugsPracticeSubjectList  获取科目
export  function searchPlugsPracticeSubjectList(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeSubjectList',
		method: 'GET',
		data
	})
}

// api/plugs/searchPlugsPracticeStudentById  获取学员科目 
export  function searchPlugsPracticeStudentById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeStudentById',
		method: 'GET',
		data
	})
}

// insertPlugsPracticeStudent 新增学员
export  function insertPlugsPracticeStudent(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudent',
		method: 'POST',
		data
	})
}

// insertPlugsPracticeStudentTestRecord   练习记录插入

export  function insertPlugsPracticeStudentTestRecord(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudentTestRecord',
		method: 'POST',
		data
	})
}  
// /api/plugs/insertPlugsPracticeStudentTestRecordDetails 

export  function insertPlugsPracticeStudentTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudentTestRecordDetails',
		method: 'POST',
		data
	})
}  

// /api/pay/getCommonPayInfoByDataId 查询用户科目有没有支付
export  function getCommonPayInfoByDataId(data){ 
	return request({
		url:'/api/pay/getCommonPayInfoByDataId',
		method: 'GET',
		data
	})
}
// /api/plugs/getPracticeStudentTestCount  获取科目练习记录数量
export  function getPracticeStudentTestCount(data){ 
	return request({
		url:'/api/plugs/getPracticeStudentTestCount',
		method: 'GET',
		data
	})
}


  // getBusinessInfoById  获取店铺详情
export  function getBusinessInfoById(data){ 
	return request({
		url:'/api/plugs/getBusinessInfoById',
		method: 'GET',
		data
	})
}

// /api/plugs/insertPlugsPetRarchives  宠物档案插入
export  function insertPlugsPetRarchives(data){ 
	return server({
		url:'/api/plugs/insertPlugsPetRarchives',
		method: 'POST',
		data
	})
}  
// /api/plugs/delPlugsPetRarchives  宠物档案删除
export  function delPlugsPetRarchives(data){ 
	return request({
		url:'/api/plugs/delPlugsPetRarchives',
		method: 'POST',
		data
	})
} 
// /api/plugs/updatePlugsPetRarchives  宠物档案修改
export  function updatePlugsPetRarchives(data){ 
	return server({
		url:'/api/plugs/updatePlugsPetRarchives',
		method: 'POST',
		data
	})
} 
// /api/plugs/getUserPetArchivesList 宠物档案列表
export  function getUserPetArchivesList(data){ 
	return request({
		url:'/api/plugs/getUserPetArchivesList',
		method: 'GET',
		data
	})
}
// /api/plugs/searchPlugsPetRarchivesById 宠物档案id查询
export  function searchPlugsPetRarchivesById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPetRarchivesById',
		method: 'GET',
		data
	})
}

// searchPlugsCollectList  收藏列表
export  function searchPlugsCollectList(data){ 
	return request({
		url:'/api/plugs/searchPlugsCollectList',
		method: 'GET',
		data
	})
}
// /api/plugs/searchPlugsFootmarkListUserId 历史记录
export  function searchPlugsFootmarkListUserId(data){ 
	return request({
		url:'/api/plugs/searchPlugsFootmarkListUserId',
		method: 'GET',
		data
	})
}

// 获取手机号

export  function getWeChartUserPhone(data){ 
	return request({
		url:'/api/oauth/getWeChartUserPhone',
		method: 'GET',
		data
	})
}

// 获取领养列表

export  function searchPlugsDataList(data){ 
	return request({
		url:'/api/plugs/searchPlugsDataList',
		method: 'GET',
		data
	})
}
// /api/platform/getUserTemplateConf  获取模板信息
export  function getUserTemplateConf(data){ 
	return request({
		url:'/api/platform/getUserTemplateConf',
		method: 'GET',
		data
	})
}
// /api/plugs/searchPlugsNoticeList  公告列表
export  function searchPlugsNoticeList(data){ 
	return request({
		url:'/api/plugs/searchPlugsNoticeList',
		method: 'GET',
		data
	})
}
// /api/plugs/searchPlugsNoticeById  公告详情
export  function searchPlugsNoticeById(data){ 
	return request({
		url:'/api/plugs/searchPlugsNoticeById',
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsDataById 获取合同数据
export  function searchPlugsDataById(data){ 
	return request({
		url:'/api/plugs/searchPlugsDataById',
		method: 'GET',
		data
	})
}

// /api/plugs/getYouMiPetPeriodizationList
export  function getYouMiPetPeriodizationList(data){ 
	return request({
		url:'/api/plugs/getYouMiPetPeriodizationList',
		method: 'GET',
		data
	})
}
// searchPlugsFormDataById
export  function searchPlugsFormDataById(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormDataById',
		method: 'GET',
		data
	})
}

// plugsPerformanceList
export  function plugsPerformanceList(data){ 
	return request({
		url:'/api/plugs/plugsPerformanceList',
		method: 'GET',
		data
	})
}



export  function generate(data){ 
	return server({
		url:'/api/plugs/generate',
		method: 'POST',
		data
	})
} 

// // 获取表单列表 searchPlugsFormDataList
export  function searchPlugsFormDataList(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormDataList',
		method: 'GET',
		data
	})
} 
// 获取所有期数
export  function getPerformanceList(data){ 
	return request({
		url:'/api/plugs/getPerformanceList',
		method: 'GET',
		data
	})
} 
// 获取待履约期数
export  function getPerformance(data){ 
	return request({
		url:'/api/plugs/getPerformance',
		method: 'GET',
		data
	})
}
// getTemplateList 合同列表
export  function getSignTemplateList(data){ 
	return request({
		url:'/api/platform/getSignTemplateList',
		method: 'GET',
		data
	})
}
// 签署合同
export  function signTemplate(data){ 
	return server({
		url:'/api/platform/signTemplate',
		method: 'POST',
		data
	})
}

// api/platform/getContract
export  function getContract(data){ 
	return request({
		url:'/api/platform/getContract',
		method: 'GET',
		data
	})
}

